---
title: clsMyTaskCollection
summary: API reference for clsMyTaskCollection.
status: draft
owner: SAIF Documentation
last_reviewed: 2026-08-21
library: SAIF.Business.Tasks.Claim
reference_type: embedded
---

# clsMyTaskCollection

`clsMyTaskCollection` is the per-mailid "my tasks" retrieval collection — the only place in this library that applies access-based confidentiality redaction, resolving four claim-access rights once per retrieval and masking worker names on flagged claims for unauthorized users, then grouping urgent-claim tasks ahead of the rest.

## Purpose
- Retrieves and redacts a user's personal task list ([Retrieve and redact "my tasks"](../../operations/op-6-retrieve-and-redact-my-tasks.md), [BR-MY-01](../../business-rules.md#br-my-01-confidential-worker-name-redaction)).
- Computes and applies the claim-grouped priority sort key ([Assign the claim-grouped sort key](../../operations/op-7-assign-claim-grouped-sort-key.md), [BR-MY-02](../../business-rules.md#br-my-02-urgent-claims-grouped-ahead-in-my-tasks-sort)).
- Rejects task source systems it does not support ([BR-MY-03](../../business-rules.md#br-my-03-unsupported-task-source-system-cannot-be-loaded)).

## Context
- Namespace: `SAIF.Business.Tasks.Claim`
- Assembly/package: `SAIF.Business.Tasks.Claim.dll` (embedded)

## Public members
| Member | Signature | Purpose |
| --- | --- | --- |
| `FilterMailId` | `Public Property FilterMailId As String` | Echoes the mailid filter used for the retrieval that populated this collection. |
| `FilterStartDate` | `Public Property FilterStartDate As Date` | Echoes the start-date filter used for retrieval. |
| `FilterEndDate` | `Public Property FilterEndDate As Date` | Echoes the end-date filter used for retrieval. |
| `FilterPolicyNum` | `Public Property FilterPolicyNum As String` | Echoes the policy-number filter used for retrieval. |
| `Add(clsClaimTask)` | `Public Overloads Sub Add(task As clsClaimTask)` | Assigns the task's grouping sort order via `setSortOrder`, then adds it to the collection ([Assign the claim-grouped sort key](../../operations/op-7-assign-claim-grouped-sort-key.md)). |
| `Item(Integer)` | `Public Default ReadOnly Property Item(index As Integer) As clsClaimTask` | Returns the task at the given ordinal position. |
| `Item(taskSeqNum)` | `Public Overloads ReadOnly Property Item(taskSeqNum As String) As clsClaimTask` | Returns the task matching the given task sequence number. |
| `Overrides AfterRetrieve` | `Protected Overrides Sub AfterRetrieve(...)` | Resolves four confidentiality access rights, materializes each row via `NewTask`/`LoadAfterSort`, applies [BR-MY-01](../../business-rules.md#br-my-01-confidential-worker-name-redaction) masking, then sorts. |
| `SortByDefault()` | `Public Sub SortByDefault()` | Sorts by `sortBy`, then `TaskDate`, then `ClaimNum` ([BR-MY-02](../../business-rules.md#br-my-02-urgent-claims-grouped-ahead-in-my-tasks-sort)). |
| `Shared NewTaskCollection(dpi)` | `Public Shared Function NewTaskCollection(dpi As IDataPortalInfo) As clsMyTaskCollection` | Factory that creates an empty "my tasks" collection bound to the data portal. |
| `Shared GetTasks(dpi, MyTaskCriteria)` | `Public Shared Function GetTasks(dpi As IDataPortalInfo, criteria As MyTaskCriteria) As clsMyTaskCollection` | Retrieves and redacts a per-mailid task list ([Retrieve and redact "my tasks"](../../operations/op-6-retrieve-and-redact-my-tasks.md)). |
| `Overrides NewTask()` | `Protected Overrides Function NewTask() As iTask` | Returns a new `clsClaimTask` instance for materialization, or `Nothing` for an unsupported source system, triggering [BR-MY-03](../../business-rules.md#br-my-03-unsupported-task-source-system-cannot-be-loaded). |

## Inherited public members

Members in this section are inherited from `clsTaskCollection` in `SAIF.Business.Tasks`. They are available on this type through inheritance.

| Member | Signature | Purpose | Origin |
| --- | --- | --- | --- |
| `Count` | `Public ReadOnly Property Count As Integer` | Returns the number of tasks currently held in the collection.† | `SAIF.Business.Tasks` — `clsTaskCollection` |
| `Save()` | `Public Overridable Function Save() As clsTaskCollection` | Applies edits and persists each contained task through the inherited stored-procedure path.† | `SAIF.Business.Tasks` — `clsTaskCollection` |

## Behavioral notes
- Private `setSortOrder(task)` latches a new grouping state whenever the row's `ClaimID` changes from the previous row, and assigns `task.sortBy` accordingly — this logic underlies both `Add` and `AfterRetrieve` ([Assign the claim-grouped sort key](../../operations/op-7-assign-claim-grouped-sort-key.md)).*
- Redaction in `AfterRetrieve` is silent — no message is surfaced to the user when a worker name is masked.

## Constraints and usage notes
- The four access checks (`HasExposureAccess`, `HasConflictAccess`, `HasCollateralAccess`, `HasSecureAccess`) are resolved once per retrieval, not per row, for performance.*

> **Note:** Statements marked with * were inferred from code structure, naming conventions, or
> contextual evidence where direct confirmation was not available in source artifacts. Statements
> marked with ** could not be confirmed; treat as unknown until verified. Statements marked with
> † were retrieved from dependency library documentation via the Legends CLI RAG service. They
> describe inherited behavior from the indicated origin library and should be verified if the
> dependency version changes.

## Sources
- SAIF.Business.Tasks.Claim/clsMyTaskCollection.vb
